﻿@using MyData.Dto
@model MeetDto
@{
    ViewBag.Title = "DepartView";
    Layout = "~/Views/Shared/_Index.cshtml";

}
<form id="form1">
    <div class="tools">
        <ul class="toolbar">
            <li class="click" onclick="fnSave()"><span><img src="../Content/UI/images/t02.png" /></span>保存</li>
        </ul>
    </div>
    <div class="formbody">
        <ul class="forminfo">
            <li>
                <label>会议名称:</label><input value="@Model.MeetName" type="text" class="dfinput" id="MeetName" name="MeetName" required />

            </li>
            <li>
                <label>会议备注</label> <textarea cols="" rows="3" class="textinput" id="MeetRemark">@Model.MeetRemark</textarea>
            </li>
        </ul>
        <input type="hidden" id="Id" value="@Model.Id.ToString()" />
    </div>
</form>
<script type="text/javascript">
    function fnSave() {
        if ($('#form1').valid()) {
            $.post("../Meet/SaveMeet", queryParams(), function (result) {
                if (result.state == 1) {
                    layer.msg('操作成功');
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index)
                    parent.$("#table").bootstrapTable('refresh');
                }
                else {
                    layer.msg(result.message);
                }
            })
        }
    }
    function queryParams() {
        return {
            MeetName: $("#MeetName").val(),
            MeetRemark: $("#MeetRemark").val(),
            Id: $("#Id").val()
        };
    }
</script>
